#ifndef MUSIC_H
#define MUSIC_H
#include<QString>
#include<QUrl>
#include <QMediaPlayer>
class Music
{
public:
    Music();
    Music(const QUrl&url);
    void setMusicName(const QString&musicName);
    void setMusicSinger(const QString&musicSinger);
    void setMusicAlbumn(const QString&musicAlbumn);
    void setIsLike(bool isLike);
    void setMusicDuration(quint64 duration);
    void setIsHistory(bool isHistory);
    void setMusicUrl(const QUrl&musicUrl);

    qint64 getDuration()const;
   QString getMusicName()const;
    QString getMusicSinger()const;
    QString getMusicAlbumn()const;
    bool getIsLike()const;
    bool getIsHistory()const;
    QUrl getMusicUrl()const;
    QString getId()const;
    QString getLrcFilePath()const;
    void setMusicId(const QString&musicId);
    void insertMusicToDB();
private:
    void parseMediaMetaData();

private:
    QUrl _musicUrl;
    QString _musicName;
    QString _musicSinger;
    QString _musicAlbumn;
    bool _isLike;
    bool _isHistory;
    qint64 _duration;

    QString _id;
};

#endif // MUSIC_H
